<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ include file="/WEB-INF/pages/template/libs.jsp"%>

<script type="text/javascript" src="resources/js/seguridad/usuarios.js"></script>

<form id="frmBuscar" action="usuario.htm" method="post"><input
	type="hidden" name="method" value="buscar" />
<div class="framelight" style="width: 800px">

<div class="title">Usuarios</div>

<input type="hidden" name="lastsearchBy"
	value="<c:out value="${lasttype}" />" /> <input type="hidden"
	name="lastvalue" value="<c:out value="${lastvalue}" />" /> <input
	type="hidden" name="lastvalue2" value="<c:out value="${lastvalue2}" />" />

<table class="formlet" cellpadding="4px" cellspacing="0px">
	<tr>
		<td>Buscar</td>
		<td><select name="searchBy" id="searchBy">
			<option value="ID"
				<c:if test="${lasttype=='ID'}">selected="selected"</c:if>>Nombre</option>
		</select></td>
		<td><input type="text" value="<c:out value="${lastvalue}" />"
			name="searchValue" id="searchValue" /> <input type="text"
			value="<c:out value="${lastvalue2}" />" name="value2" id="value2"
			style="display: none" /></td>
		<td><ex:button color="blue" onClick="doBuscar();">
			<bean:message key="app.forms.button.find" />
		</ex:button></td>
	</tr>
</table>

</div>
</form>


<br>

<div style="width: 800px;">

<table width="300px">
	<tr>
		<td width="100px"><ex:buttonbar onClick="nuevo()">Nuevo</ex:buttonbar></td>
		<td width="100px"><ex:buttonbar>Modificar</ex:buttonbar></td>
		<td width="100px"><ex:buttonbar>Eliminar</ex:buttonbar></td>
	</tr>
</table>


<div class="grid">

<c:if test="${usuarioList!=null}">

<table cellspacing="0" width="70%" align="center">
	<thead>
		<tr>
			<th width="20px"><input name="" type="checkbox" value=""></th>
			<th width="30px">Codigo</th>
			<th>Nombre</th>
		</tr>
	</thead>

	<tbody>
	
		<c:forEach var="usuario" items="${usuarioList}">
		
		<tr usuarioId="<c:out value="${usuario.id}"></c:out>">
			<td align="center"><input name="" type="checkbox" value=""></td>
			<td align="center"><ex:button color="white" align="center"
				onClick="selectedRow(this);"><c:out value="${usuario.id}"></c:out></ex:button></td>
			<td><c:out value="${usuario.nombre}"></c:out></td>
		</tr>

		</c:forEach>
		
	</tbody>
	<tfoot>
		<tr>
			<td colspan="5"><ex:pager total="10" current="1"
				onPaging="javascript:onPaging(%p);" /></td>
		</tr>
	</tfoot>

</table>

</c:if>

</div>
</div>
